import {base64ToFile} from "@/utils/convertBase64ToFile.js";
import {convertFileToUrl} from "@/utils/convertFileToUrl.js";

export class ImgQualityEnhance{
    constructor(imageBase64) {
        this.imageBase64=imageBase64
        this.imageFile=''
        this.imageUrl=''
    }

    async parseJson(res) {

        const data = JSON.parse(res.data.data)

        this.imageBase64 = data.image   //这里是Base64编码


        console.log("转换成文件")
        this.imageFile = await base64ToFile(this.imageBase64,"image/png'")


        console.log(this.imageFile)



    }

}